# -*- coding: utf-8 -*-
# @Time    : 2021/11/18 23:22
# @Author  : TangDagui
# @Email   : 3297364807@qq.com
# @File    : PythonTwo.py
# @Software: PyCharm
from random import randint

num = 23
count = 0
s = 1000
for i in range(1, s + 1):
    birthday = []
    for j in range(num):
        birthday.append(randint(1, 365))
    a = len(birthday)
    b = len(set(birthday))
    if a != b:
        count = count + 1
print("23人中至少两个人生日相同概率为:{:.2f}%".format(count / s * 100))
